package com.homework.controller;

import com.homework.utils.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Slf4j
@Controller
public class IndexController {

    @Autowired
    RedisUtil redisUtil;

    @GetMapping("/")
    public String index(){
        log.info("--------------->首页请求接口方法，跳转首页");
        log.info("--------------->redis的操作工具测试");
        redisUtil.set("nihao","redisUtil is ok ");
        System.out.println(redisUtil.get("nihao"));
        return "index";
    }
}
